package com.ztjava.tieba.validator;

import com.jfinal.core.Controller;
import com.ztjava.core.Constant;
import com.ztjava.core.base.BaseValidator;

public class AddContentValidator extends BaseValidator {

	@Override
	protected void validate(Controller c) {
		validateRequired("subject_id", Constant.MESSAGE, "没有主题");
		validateRequired("name", Constant.MESSAGE, "请填写标题");
		validateString("name", 2, 50, Constant.MESSAGE, "标题必须2-50个字");
		validateRequired("content", Constant.MESSAGE, "请填写内容");
		validateString("content", 2, 400, Constant.MESSAGE, "内容必须2-400个字");
	}

}
